package com.java.test4;

import java.util.Scanner;

public class ColaEmployeeManager {
	// 属性：定义一个数组
	private ColaEmployee[] emps;

	// 行为
	public ColaEmployeeManager() {
		init();
	}

	public void init() {
		emps = new ColaEmployee[3];
		emps[0] = new SalariedEmployee("章三", 6, 9512);
		emps[1] = new SalesEmployee("李四", 8, 1000, 56);
		emps[2] = new HourlyEmployee("王五", 12, 48, 56);
	}

	public void printEmployeeSalaryByMonth(int month) {
		if (emps != null) {
			System.out.println("Cola公司" + month + "的工资名单：");
			for (ColaEmployee colaEmployee : emps) {
				colaEmployee.printSalary(month);
			}
		}
	}

}
